<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>首页</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
  </head>
  
  <body>
	<h1>测试</h1>
	<hr/>
  	<c:choose>
  		<c:when test="${sessionScope.user == null }">
  			<a href="${pageContext.request.contextPath }/jsp/register.jsp">注册</a>
  			&nbsp;&nbsp;&nbsp;&nbsp;
  			<a href="${pageContext.request.contextPath }/jsp/login.jsp">登录</a>
  		</c:when>
  		<c:otherwise>
  			欢迎您！！！${sessionScope.user.username }
  			&nbsp;&nbsp;&nbsp;&nbsp;
  			<a href="${pageContext.request.contextPath }/servlet/ControllerServlet?op=logout">注销</a>
  		</c:otherwise>
  	</c:choose>
  </body>
</html>
